added AJAX with pages