changes done to make the AJAX work
calculations completed