Add solutions to problems 16, 24 and 29