Solving For Median