new version for find median of two sorted arrays