build gui first