factor out Recorder class