gui design refactored a bit