rework upload script