add file download function