update median of two sorted arrays