I like the symmetry with encode however. Any suggestion beside "if"