change return type from html to json