updated assignment with matrix inverse code