tiny refactor with xsd methods