added ability to fill template and download.