improvements for ES performace