gui work and logic