print as function