fixed bugs as specified in HW6