Add code to find a maximum subarray and test