added support for in place multiplication and sums