The first mechanical clocks were probably made in the 8th century. Liang Lingzan and Yi Xing were Chinese scholars who are believed to be the inventors of the first clock mechanisms. In Europe, more than 200 years later, a French monk and mathematician Gerbert of Aurillac, later Pope Gregory II, worked on similar structures. Originally, mechanical timepieces were used in monasteries to determine canonical hours in a precise way. Currently, old clock mechanisms, including complicated gear wheel systems, as well as brass pendulums or hands can serve a decorative function and hang on the wall like a work of art.