Fixed the print function. It now works properly