added parent(), child(), and improved path().