refactoring default if tag block.