Final code for second code review for week 2