gui refactored