get rid of not-require branch, vanilla JS version