changed the print funcion