add Median implementation using insert sort