gen formation by condition func;