adding optional context scope, closes #1