refactor download code