external js file for events