solution: recursive