almost completed gui interface