Had trouble making hw6 so continued from 5