add mean and median calculation