rename variables, add storing of seen message-id's