refactor phase 1 upload 2