id checks if entry already exists. sent says if the entry is already sent to the db
time refactoring refactoring again