Using vanilla js instead of jquery