moved playback handling into session