filtering is implemented. Need to be well tested.