pull discover_csv off to separate function