minimize print function