added left out case when search key is in the rightmost path