Initial commit of download function is working