added some gui code