optimized delete & generate