put a context on the callbacks for ws