search function fixed
advanced tests added, all tests passed on local machine