add support to reconstruct the bag