finished pkg.Encode()