first two problems
question 3
question 4
question 5 and ammended question 3