refactor gfind / sfind