- added some debugging calls to the unpack function