build_extends, replace-nth, permute