changed so that filtered by time