add nodes with valency