terminal base functions