added a service between controller and repository