upgrade codes for multi-node