generate_playlist rewritten but untested