updated for loop variable name to match data