add assignSumToTail