Added visualizeText function