just cleaning up the code for search a tiny bit