if clause generation