added try/except for duplicate entries