class 2 homework exercises

closes #7