cahnged filtering from bools to masking