solved problems 19, 21, and 22