refactor for the events
some more gui ideas