tlg convert refactored