added mocking for the database layer