Revert "Revert "Inverse done""

This reverts commit f43af38d7e0f54dcec93b8d03f021ac916f8dcb9.