add print function to replace deprecated util.print