function doc edit