added row sum function, also renamed original sum function to column sum function. they work, but are some what fragile at this point