second recursive iteration