simple fix to avoid using case syntax

@alejandrogutierrez someone thought me this once, hope it helps to simplify it!