rewrite matches on even_odd_dec to use 'if'