basic changes to php and python script