solved problems 8 to 12