fixed duplicate variable names