added quoting to download function