messy but working multiple uploads