fixed up reference time function