added struct GlobalSettings for easier event handling