change upload function