Updated problem 3