finally fixed queues, added ES count option