Added inverse function.