part of recursion exercise