modified the multiplication by using pysparse's multiplication operations