Problem 5 is finally finished