Added code and tests for child nodes to be returned