pulled out duplicated code and simplified uploaders