refactor download/populate_db