Added the explicit xoring part