replay data logic.