moved generator methods to model