moving generators into controllers