elements as an array
some tweaks to the example