Refactor a else/if