got the database integration working, removes duplicates.