some methods moved to TimeUtil