median of two arrarys - 1st version