tweaked print function