recursion, all tests except encore passed