Port example to new context API