finished problem 24