refactored xslt, now working in primary stats