minor optimization of multiplication subroutines