removed firstChild option in recursion call