added some BitArray caching