sort out the php