Added AJAX functions to get data dynamically