homework 2 fixes