moved more business logic to user model