added cached inverse