etl refactor