added naive filtering