finished pseudocode
Initial solution to median
Refactered solution to median
refactored solution for median