modified gbsearch