Make ranks db-based