- changes based on review feedback
- extracted the downloadData functionality into a separate file