implement new ranking system
merged with master