refactor node.go; use once