In the legend of the flood only Noah and his family of all the human race are said to have survived the deluge (Gen. 6–9), chosen by God because of Noah's goodness of character (though it was not sustained indefinitely, Gen. 9: 21). In the ark in which the family huddled there were also pairs (the P source) of other living species (or seven pairs of clean animals and two pairs of unclean animals, Gen. 7: 2–3, the J source). After surviving the deluge, Noah emerged to offer sacrifice to God and to receive the promise confirmed by the sign of the rainbow that there would never again be a similar cosmic catastrophe. Noah also received the covenant with laws (Gen. 9: 17) to apply to the whole future human race. In the NT the waters of the flood (through which Noah was saved) are regarded as a type of baptism (1 Pet. 3: 18–22).