refactored node struct