modify function write list