switch to vanilla js