Added functionality for nodes to join and leave dynamicly