add getMonthsWithYears method to repository