Renamed the index in the convert function to text.