updates to php code