modify generate rules