final version of code to submit