switch for types and attempt for TextElement