started modifying some code to use AJAX