sum := arr1[1]; should work