change return type to json