internalizing recursive step