refactor generate_frase