fix how array of variables gets made