Added sortDocs function to Rice class