Revert "Revert "Added print function""

This reverts commit 83c5f50e23ca385878fb1aaf5acfb1e7a9d6ad7d.