XO indi refactored, better performance