methods to submit the codes