note time should be global not local