search and generalFuncs