Add settings variable to decide whether to use ES or not