add support for text chunks and R metadata