new package for events. some optimisation of what I now know to be ridiculously slow javascript calls