add unit test, add repository, add dependency injection