add a case for terminal