completed seach array function