add Terminal class into dfs package