added maxSumSequence