more work on improving and clarifying the tchan code