Moved logic to model from controller