TED: fix #256
add tests for TED