working re-build of upload code