added division-agnostic xtabs function and associated tests
merge xtabs feature branch