resolve KAZOO-705: refactor the get_slot_number algorithm