How was new year invented?

well my teacher told me there was a race between 12 animals to decide who is the best or who should come first in the calender for chinese new year. the rat came first because it kinda cheated by climbing on to the ox at the last minute so it was first hope that helped