Revised maxsubsum