simpler pack/unpack