multiplication loop