change batched_store to use only 1 internal hashtbl (simpler and more efficient)