context.js: add working prototype