conversion from string to BitSet and back