this source is to require refactoring for Download function