collapsing else/if condition