update code - add debug code for datetime