refactor brazil