1st draft of generate_playlist now working