Added convertToText function