search the elements linearly