more fixes to homework 3