In what ways did the south legalize racism