improve filtering - to be tested