port code from +17 branch, fix operator *=