solving problem 024