work towards correct filtering but not yet working