fix generation method