Implemented a way to iterate over the set bits