updating variables so they are more efficient