removed malloc and free
refactored and simplified everything, need to write unit tests for bitset
refactored and simplified everything, need to write unit tests for bitset