drawing line to terminal