searchArrays only finds smallest element