Vanilla js to debug