Update routing code to not use array index but atomic number