matching against XString structs; could be less verbose?