sentences:  Yuan delivered Yang Gongren to the Tang capital Chang'an.As Emperor Gaozu, while a Sui official, was a friend of Yang Gongren's, he released Yang Gongren and made him the assistant head of the examination bureau of the government (門下省, "Mengxia Sheng") and created him the Duke of Guan.Emperor Gaozu soon made Yang Gongren the commandant at Liang Prefecture (涼州, roughly modern Wuwei, Gansu), because of his familiarity with the region.