move the business logic into the models