I hate the first solution (difficult to read and not extensible) :(
But the second is :+1: for me ;)