fixed the case where no data is given median finder