tweak to dateser function