refactor replay to make pipeline more clear
Merge pull request #30 from Clever/refactor-replay

Refactor replay