Homework 2 Code