converted to print function