refactored and added multiplication test