added solutions to problems 6 & 7