I prefer my version, as it's more clear and more easy to extend.