change to use JSON response