find median of two arrays