assignment 3 - problem 4 resolved