hmwk6 made some changes