implemented duplicateName -- see #6