Rough implementation of replay.