add state to initialize ES