Changing sequences to arbitrary number of nodes.