updated for ranking