https://validation.pythonprogramminghelp.com/3-ways-to-modular-decomposition/