added structure to php; need to change the php code