* updated code to use date function rather than date at server instantiation