added solutions to problems 3,4,5