Added corrections + ability to use the 2d version in the example