added rotatedBinarySearch