reorganizar loop