add support for historical replay