first version, supports nesting and translating repeated tags into a collection