fixed problem with dates
refacored code
changed interval to las day of month