refactor service layer to use interfaces