add callback to ajax request
working cut & paste