Advanced homework 8 problems 1,2