started implementing the packing/unpacking