generates Factory too