Added MyNode class to help determine if getData() returns a node or a list