new print function, standardized for all functions