Modified API to work with modified php code