added maximum sum of contiguous subarray: kadane's algo