upload data and load function