Added some logging and converted data.js's response to a  response.