remove unneeded variable assignments