atm in vanilla js