commented out scipy
refactoring upload code