moved require line from controller to model