Completed week 2 code