extracting code from controller to model