Use median instead of mean