refactoring setting text on a node