https://salt.pythonprogramminghelp.com/behind-the-scenes-of-a-diagonal-form/