fixing and testing search