working version of local recording.