update multiplication algorithm