added exception handling (duplicate entry).