implement matrix inverse and update test suite