update print function