matrix ops fixed