added subsetMonths function