separate code out into different files
attempting to support concurrent downloads