simpified searching and added functionality for searching for phrases