improve inplaceMultByInt