break up codes and link them together