added mode comments to median function