refactored node system