fix xab bug and formatting

Closes #74