makes code more dry
Merge pull request #10 from folieadrien/refactor-gui

makes code more dry