Corrected d=2 implementation