first draft for vanillaJS version;
update demo;