updated multiply subroutine