get both parsing and serialization of bitfields working