add basic ranking algorithm

Very basic atm.