Based on @jbrains Legacy Coderetreat!