removed redundant search matches function