ted cruz beats back donald trump in two states, shifting race