improve response encoding
document