rewrite print to print_ function