more intelligent time handling