search works but should revise WHERE clause