Added 3 support for 3 dimensions.