unpack should allocate for you
allocate return values for you