Added the download function. Resolved #4