added smart print statement