[enh] added persistence of ctx