finished maximizingxor