added predicate object and some compare methods for the timeinterval