adding ajax to the index page