Changed so that an element cannot be added twice