init variables to correct referencing.