refactoring + keepPlaying handling