made xdo marginally more efficient