changes to get previous ranking