download as a thread