extracted playback logic