coding in Tian-dynasty