repository most_by method added for refactoring