add context to protocol callback