added support for text nodes