working on playback functionality