adding ajax request to listener