optimize ets operations