Expanded print function