Added priority for connecting nodes.