Added fixed Problem 3