refactoring playback functions