add data upload function