how to use search for array