cleaning up upload script