some refactoring for elsa puppet