improve the upload script