enhance: move class testing into xpath