reference correct variable