better code else/if organization