added download option in the code