finalized code to submit for assessment