Added code for inverse matrix