updated front-end JS