added median of 5 functions