add ex8, problems 1 and 2