sampler uploader refactoring