largest contiguous sub-array sum
some edits