moved model class out of controller