replaced controller with model