wrote test for filtering and PW detection