added extra_context support