solving P01