refactor uploader. added polling