repository pattern implemented to reflect business logic