implemented database write after person extraction to fix duplicate
elimination