generalized event library for the front-end