changing old code so it works with the new months fxn