Adding pack/unpack methods.