move where filter clause to option