Added double query for ranking