Switch to using intrinsics