Implementing UNPACK