fix download
refactor