added AJAX but sync