working on fixing download code