added downoad functionality