add the final version of inverse