the enumerate thingo not needed
extracted recursion