Homework 4 fixes