First functional version, example
Functional example with dynamic DOM