add vanilla js version