refactor ES for DS