fix the search function & makefile