Does this code work both and without the thing being a replica? One intermediate step is joining k+1 nodes at once to maintain replication