sum along dimensions tested