updated p2os code