now gets median of file.