Modified print function added