homework 4 fixes