remove duplicate variable assignment