When a member of the family died there were varying degrees of prostration and display of piety amongst family members, each one behaving differently according to the custom of kinship association with the deceased. There was to be no flashy or colorful attire while in the period of mourning, and proper funerary rituals were observed such as cleansing and clothing the deceased to rid him or her of impurities. This was one of the necessary steps in the observance of the deceased as one of the worshipped ancestors, which in turn raised the prestige of the family. Funerals were often expensive. A geomancer had to be consulted on where to bury the dead, caterers were hired to furnish the funeral banquet, and there was always the purchase of the coffin, which was burned along with paper images of horses, carriages, and servants in order for them to accompany the deceased into the next life. Due to the high cost of burial, most families opted for the cheaper practice of cremation. This was frowned upon by Confucian officials due to beliefs in the ancestral cult. They sought to ban the practice with prohibitions in 963 and 972; despite this, cremation amongst the poor and middle classes persisted. By the 12th century, the government came up with the solution of installing public cemeteries where a family's deceased could be buried on state owned property.