Refactor playMusic()