add some gui functions