- added a date mapping function