updated gui code