add setChildren method to node class