added events script to allow external config