Updated print code