added eric's fix for possibly faster B R swapping