refactoring gui.Listeners