optimize print output