using unpack function