refactoring of two classes in service instead than model