pass info using data object, and updated responses to use json response