fixed argument name in median function