add upload logic #1