added printing routine