problem 16

problem 17

problem 18

problem 19

refactoring problem 19