https://medium.com/@pixelprofits/mastering-recursion-solving-complex-problems-with-simple-solutions-53e0518f445a