update for duplicates env/non-env elements