split Enviroment and Engine in factory