adds local database to keep track of messages