multiplication by zero optimization