Using inverse instead of manually compute inverse