add variable number of nodes

Change-Id: I34e50f7edb33120d1e3d754dffc6b34d95510cdd