added overloaded version of addcontext() with explicitly configurable context size