fixing generating process