People started carefully cleaning their homes, having large family dinners, and staying up late on the day before Chinese New Year by the end of the Three Kingdoms (3rd century). By the end of the Jin in the 5th century, these things had become a common part of Chinese life. Some Taoist magicians may have made gunpowder as early as the Han or Jin, but they certainly had it by the 9th century at the end of the Tang. Over the next few centuries, fireworks and firecrackers replaced burning bamboo as a way to chase away anything bad and to welcome in the New Year.