Added inverse calculation