fixed search method that i broke