it was considerably renovated in the 13th century (more precisely 1231) during the rule of bulgarian tsar ivan asen ii to serve as a border fortification against latin raids, as evidenced by an eight-line wall inscription. the foundations of fortified walls—the outer ones being thick and preserved up to a height of , originally high—a feudal castle, 30 rooms and 3 water repositories have been excavated from this period.