added some comments, should refactor main to tests
removed unused bit_array_nextset