added index building on unpack