hw6 minor improvements to ex3