implement global search fnction