refactor batcher into singleton