added id to document entry
now saving documents in database and checking if documents have already been read