1. added ajax to api.php