add filtering on Z0, Z1, Z2

Please do not rely on this; it's horrible ad-hockery that
needs to be replaced soon.