first commit of mag-gen