working on the AJAX callback to python