Several HW4 problems