added replace to generate