add code to finish the homework