moved a variable declaration towards other variables