Updated problem 4