improved time filtering