ej1 refactor