Add solutions to Q5 & Q6