added terminal for query interface