added time and date function (not working)