combining the codes