added printing capability