changed methods for new tree structure (getParagraph)