Adding code for inverse matrix