Work on JS for updating events