refactored node child and parent methods