added terminal class