implemented elementwise multiplication, more bug fixes