constify some print and ts functions