Updated problem 24