Galaxy formation with stars