modified upload to accommodate for multi-target