removed unnecessary check if element was already present in container