last function, ranks all hospital by each state