improved set for implementation for bit vector puzzle