Added to record and playback logic