checking if codes were used