Removed median calculation