100% test coverage for bit array
improve API and add more tests