changed responses to JSON