Solutions to problems 1-10