moved a line up a bit as the variable was referenced earlier