moved appCtx