add basic AJAX functionality