terminal print function