Update the header for the function xb
Make the xb signature a bit more flexible