Added solution for first stage - business logic and database access