refactored for upcoming download module