refactor of playlist basic example