update app context creation sample