added 3x3 inversion