- added formatting dates function