Modified best.R and rankhospital.R