generate => rename
use ext-ext
externalize rename function and ext function. update tests