fixes to hw6
after merging