Refactored multiply()