updated solutions to questions 16 and 17