fixing vanilla js