adding solutions to questions 1, 2, 3, 4, 8, 9, 10 and 16