solving P21