2c2p.php function modified