refactor playNextInPlaylist method