reorganised recursion file