debugging replays and refactoring