adding homework - done through problem 3