adding const for year day, month, year and number of records and some code cleanup