write function reload