added an array to keep track of variables selected