corrected duplicate variable