add functions about terminals