working version of UploadManager