rNext cNext

changed rTemp and cTemp to rNext and cNext