Updated to use new primitives