an obvious optimization for multiplication