Updated code for print

Updated code for print