added download option, added content type headers