set up response from ajax