corrected matrix mult