implemented full search and fixed other bugs