Added first version of matrix inversion