https://stacks.pythonprogramminghelp.com/the-one-thing-you-need-to-change-inversion-theorem/