added recording and playback feature