changed multiply function