changed mul_elemwise to promote scalars