getFavorites refactoring