move business logic to a separate file