solutions for problems 21-39