adapted download process to context refactoring