started working on the php code