hw6 generating