Initial code for median;Very Basic approach