complete setDownloadState, to be tested