added comments and a feature of transferring keys when a node leaves