completed median finding