extended discusson of how ranking works