improve upload script. it will now use environment variables