moved business logic from views to services