closes #42. handles sum(2*x) where x is a vector.