update shift number of nodes