assignment1 - problem4