Gui Code workings