writing some codes for PO