WIP: simplify if/else/elsif statement