Homework 2 of Troy Hua for 11-791