modified the php code