changed ctx.get_resource to download_resource