initial search, bug fixed