refactoring download package