added duration to resource
rejigging elements to match very strict xsd parser