Put the business logic into model