data uploader partly working, refactoring