initial convert of jquery to vanillajs