separated the configuration out of event.js