adding and syncing database