updated print to a functions