Changes to print function

Small changes to print function