trying to make the php function work