Updated for homework 2