Added ‘gui code into main