solving P05