refactor reposotories service