plain text and token conversion