refactor repo service provider