added sum() and scale()