Worked on print function