Added terminal_sing function