people were at the top in the social order and common people and slaves being at the bottom. However, the class was not rigid; a man of humble origins could ascend to a high post. The ancient Egyptians viewed men and women, including people from all social classes, as essentially equal under the law, and even the lowliest peasant was entitled to petition the vizier and his court for redress. Farmers made up the bulk of the population, but agricultural produce was owned directly by the state, temple, or noble family that owned the land. Farmers were also subject to a labor tax and were required to work on irrigation or construction projects in a corvée system. Artists and craftsmen were of higher status than farmers, but they were also under state control, working in the shops attached to the temples and paid directly from the state treasury. Scribes and officials formed the upper class in ancient Egypt, known as the "white kilt class" in reference to the bleached linen garments that served as a mark of their rank. The upper class prominently displayed their social status in art and literature. Below the nobility were the priests, physicians, and engineers with specialized training in their field. It is unclear whether slavery as understood today existed in ancient Egypt; there is difference of opinions among authors. Although slaves were mostly used as indentured servants, they were able to buy and sell their servitude, work their way to freedom or nobility, and were usually treated by doctors in the workplace. Elsewhere In Ancient Greece when the clan system was declining. The classes replaced the clan society when it became too small to sustain the needs of increasing population. The division of labor is also essential for the growth of classes. Historically, social class and behavior were laid down in law. For example, permitted mode of dress in some times and places was strictly regulated, with sumptuous dressing only for the high ranks of society and aristocracy, whereas sumptuary laws stipulated the dress and jewelry appropriate for a person's social rank and station. In Europe, these laws became increasingly commonplace during the Middle Ages. However, these laws were prone to change due to societal changes, and in many cases, these distinctions may either almost disappear, such as the distinction between a patrician and a plebeian being almost erased during the late Roman Republic.