implementing version managment encoding / decoding