Added boolean filter logic.