add text/plain formatting
add doc parsing code