move to src/main/scala
batch send & counter